package com.boot.main.controller;

import com.boot.main.service.ISyslogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/v1/api")
@Api(tags = "日志模块")
public class LogController {
    @Resource
    private ISyslogService syslogService;

    @RequestMapping(value = "/syslogs", method = RequestMethod.GET)
    @ApiOperation(value = "获取用户日志")
    public Object getSyslog(@RequestParam("page") Integer page,
                            @RequestParam("limit") Integer limit,
                            @RequestParam("username") String username){
        return syslogService.getSyslog(page, limit, username);
    }
}

